import pandas as pd
from pandas.plotting import register_matplotlib_converters
import numpy as np
import matplotlib.pyplot as plt



reader = pd.read_csv('d:\\py\\data\\unemployment-rate-1948-2010.csv')
xa=reader['Year']
ya=reader['Value']

plt.figure()
plt.scatter(xa[:], ya[:], s=10,c='g',marker ='o',alpha =0.5)
poly= np. polyfit(xa, ya, deg =3)
plt.plot(xa, np.polyval(poly,xa))
plt.title('1948-2010失业人口拟合曲线',family ='kaiti',size=20, color ='c',loc='center')  
plt.savefig("d:\\py\\1948-2010失业人口拟合曲线")                                                                                                                                                                                   
plt.show()  
